package cn.tedu.csmall.product.mapper;

import cn.tedu.csmall.product.pojo.VO.SpuDetailListVO;
import cn.tedu.csmall.product.pojo.VO.SpuDetailStandardVO;
import cn.tedu.csmall.product.pojo.entity.SpuDetail;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface SpuDetailMapper {
    /**
     * 插入spu详情数据
     * @param spuDetail spu详情数据
     * @return 受影响的行数
     */
    int insert(SpuDetail spuDetail);

    /**
     * 批量插入spu详情数据
     * @param spuDetails spu详情数据
     * @return 受影响的行数
     */
    int insertBatch(List<SpuDetail> spuDetails);
    int deleteById(Long id);
    int deleteByIds(Long[] ids);
    int update(SpuDetail spuDetail);
    int count();
    SpuDetailStandardVO getStandardById(Long id);
    List<SpuDetailListVO> list();
}
